export default {
    data() {
        return {
            provinceOptions: [],
            cityOptions: [],
            areaOptions: [],
            provinceValue: []
        }
    },
    methods: {
        provincAreaDetailInfoList(val) {
            this.$http.get('/sys/region/list', { params: { pid: val } }).then((res) => {
                if (res.msg = 'success') {
                    this.provinceOptions = res.data.data || []
                }
            })
        },
        cityAreaDetailInfoList(val) {
            this.$http.get('/sys/region/list', { params: { pid: val } }).then((res) => {
                if (res.msg = 'success') {
                    this.cityOptions = res.data.data || []
                }
            })

        },
        countyAreaDetailInfoList(val) {
            this.$http.get('/sys/region/list', { params: { pid: val } }).then((res) => {
                if (res.msg = 'success') {
                    this.areaOptions = res.data.data || []
                }
            })

        },
        regionChange(val, type) {
            if (type == 'province') {
                console.log(type, val);
                this.cityAreaDetailInfoList(val)
            } else if (type == 'city') {
                this.countyAreaDetailInfoList(val)
            } else if (type == 'area') {
            }
        },
    }
}